package main

type SmallMarioState struct {
	mario *Mario
}

func (s *SmallMarioState) Name() string {
	return "小马里奥"
}

// ObtainMushroom 获得蘑菇的状态
func (s *SmallMarioState) ObtainMushroom() {
	//  获得蘑菇的情况下，变成草鸡马立奥
	s.mario.score += 100
	s.mario.ChangeState(s.mario.superMarioState)
}

// ObtainCape 获得斗篷变为斗篷马里奥
func (s *SmallMarioState) ObtainCape() {
	s.mario.score += 200
	s.mario.ChangeState(s.mario.capeMarioState)
}

// MeetMonster 遇到怪兽
func (s *SmallMarioState) MeetMonster() {
	s.mario.score -= 100
}
